const mongoose = require('mongoose')

const Users = mongoose.model('Users', new mongoose.Schema({
    name: {type: String},
    phone: {type: Number},
    password: {
        type: String,
        select: false,
        set(val) {
            return require('bcrypt').hashSync(val, 10)
        }
    },
}, {timestamps: true}))

module.exports = Users